home *** CD-ROM | disk | FTP | other *** search
-
-
-
- FFFFSSSSCCCCTTTTLLLL((((7777)))) FFFFSSSSCCCCTTTTLLLL((((7777))))
-
-
-
- NNNNAAAAMMMMEEEE
- fsctl - operations on a mounted file system
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- /dev/fsctl
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _f_s_c_t_l presents a device interface for performing low-level operations on
- a mounted file system. This driver is used by the file system
- reorganizer, _f_s_r.
-
- WARNING: this driver does NOT copy or otherwise operate on data within
- file system blocks. This can be done through the raw device interface to
- the file system.
-
- Only the superuser can open /_d_e_v/_f_s_c_t_l. Only one process at a time can
- open this device.
-
- The following operations are available as _i_o_c_t_l(_2) calls on a file
- descriptor opened on this device. The second argument to _i_o_c_t_l(_2) is the
- command name. The third argument is a pointer to a _s_t_r_u_c_t _f_s_c_a_r_g with
- the specified fields appropriately set. The command names and the
- structure are defined in ////uuuussssrrrr////iiiinnnncccclllluuuuddddeeee////ssssyyyyssss////ffffssssccccttttllll....hhhh....
-
- IIIILLLLOOOOCCCCKKKK ddddeeeevvvv iiiinnnnuuuummmm
- Locks the inode, synchronously updates the physical disk with
- the current state of the in-core inode, synchronously updates
- the file's data blocks to disk, and invalidates any cached
- pages for this inode. This is an inode lock which will cause
- any system call from any process to block until released by an
- IIIIUUUUNNNNLLLLOOOOCCCCKKKK....
-
- [EFAULT] Failed to copy in argument to _i_o_c_t_l(_2).
-
- [EBUSY] Another inode is already locked by this device, or
- the specified inode is in use.
-
- [ENOENT] The file system was unmounted before the inode could
- be read from the disk and locked.
-
- [EINVAL] The device is not a mounted file system, or the inode
- is not a regular file.
-
- [EFBIG] Failed to read in indirect extents.
-
- IIIIUUUUNNNNLLLLOOOOCCCCKKKK ddddeeeevvvv iiiinnnnuuuummmm
- Unlocks the inode.
-
- [EFAULT] Failed to copy in argument to _i_o_c_t_l(_2).
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- FFFFSSSSCCCCTTTTLLLL((((7777)))) FFFFSSSSCCCCTTTTLLLL((((7777))))
-
-
-
- [EINVAL] The specified inode is not currently IIIILLLLOOOOCCCCKKKK''''eeeedddd....
-
- IIIICCCCOOOOMMMMMMMMIIIITTTT ddddeeeevvvv iiiinnnnuuuummmm nnnneeee eeeexxxx nnnniiii iiiixxxx
- This commits the new direct and indirect extents, and
- synchronously updates the new inode and indirect extents to
- disk. The state of the inode is otherwise unchanged -- IIIICCCCOOOOMMMMMMMMIIIITTTT
- does not update the inode ctime, or mtime, for example. nnnneeee is
- the number of direct extents. eeeexxxx is a pointer to the direct
- extents. nnnniiiieeee is the number of indirect extents. iiiixxxx is the
- pointer to the indirect extents. A check is made that all
- blocks described in the new extent and indirect extents are
- valid and allocated data blocks. This does NOT copy the
- contents of any data blocks in the implied move as a result of
- IIIICCCCOOOOMMMMMMMMIIIITTTT''''iiiinnnngggg new extents, nor does IIIICCCCOOOOMMMMMMMMIIIITTTT automatically free
- any blocks which are now no longer described by the file's
- extents. If IIIICCCCOOOOMMMMMMMMIIIITTTT fails for any reason the inode and its
- data remain intact and unchanged.
-
- [EFAULT] Failed to copy in argument to _i_o_c_t_l(_2).
-
- [EINVAL] The specified inode is not IIIILLLLOOOOCCCCKKKK''''eeeedddd....
-
- [EINVAL] The extent information is not valid. The extent and
- indirect extent information must be consistent and
- the blocks they describe must be allocated.
-
- [EFAULT] Failed to copy in argument to _i_o_c_t_l(_2) or the extent
- lists to which this points.
-
- BBBBAAAALLLLLLLLOOOOCCCC////BBBBFFFFRRRREEEEEEEE ddddeeeevvvv bbbbnnnn lllleeeennnn
- Allocates/frees the specified blocks.
-
- [EFAULT] Failed to copy in argument to _i_o_c_t_l(_2).
-
- [EINVAL] There is currently no IIIILLLLOOOOCCCCKKKK''''eeeedddd inode in the specified
- device.
-
- [EINVAL] The specified data blocks are not valid data blocks.
-
- [EEXIST] The specified data blocks are not currently
- free/allocated.
-
- TTTTSSSSTTTTAAAALLLLLLLLOOOOCCCC////TTTTSSSSTTTTFFFFRRRREEEEEEEE ddddeeeevvvv bbbbnnnn
- Returns the number of cylinder group data blocks allocated/free
- on the specified dev starting at block bn.
-
- [EFAULT] Failed to copy in argument to _i_o_c_t_l(_2).
-
- [EINVAL] There is currently no IIIILLLLOOOOCCCCKKKK''''eeeedddd inode in the specified
- device.
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- FFFFSSSSCCCCTTTTLLLL((((7777)))) FFFFSSSSCCCCTTTTLLLL((((7777))))
-
-
-
- [EINVAL] The block number is not a valid data block number.
-
- RRRREEEEOOOORRRRGGGGAAAANNNNIIIIZZZZEEEERRRR UUUUSSSSAAAAGGGGEEEE
- The reorganizer, _f_s_r, uses /_d_e_v/_f_s_c_t_l as follows:
-
- open(/dev/fsctl)
- for each file system
- for each regular file
- ILOCK
- find better location using TSTFREE/TSTALLOC
- BALLOC new bn+len
- copy blocks to new bn+len using fs device
- ICOMMIT new extents using new bn+len
- BFREE old bn+len
- IUNLOCK
- close(/dev/fsctl)
-
-
- FFFFIIIILLLLEEEESSSS
- /usr/include/sys/fsctl.h
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fsr(1M).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- These _i_o_c_t_l(_2)'_s all return -1 on error. Otherwise, all commands except
- TSTALLOC and TSTFREE return 0.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-